package felix.rule.data.msg;

import felix.actor.core.msg.TActorMsg;
import felix.actor.core.msg.TMsgType;
import felix.rule.data.msg.EngineMsg;
import lombok.Data;

import java.util.Set;

@Data
public final class QueueToRuleEngineMsg implements TActorMsg {

    private final String ruleId;
    private final EngineMsg engineMsg;
    private final Set<String> relationTypes;
    private final String failureMessage;

    @Override
    public TMsgType getMsgType() {
        return MessageType.QUEUE_TO_RULE_ENGINE_MSG;
    }

    public boolean isTellNext() {
        return relationTypes != null && !relationTypes.isEmpty();
    }
}
